package com.webbei.myCustom.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;

import com.webbei.myCustom.service.myCustomService;
import com.webbei.pojo.Userhot;

public class searchRecoFriends {
	private myCustomService mcs;
	private String value;
	private List<Userhot> userhots;
	
	public String execute(){
		String _username=(String) ServletActionContext.getContext().getSession().get("username");
		value=MyUtil.format("%"+value+"%");
		System.out.println(value);
		String username=_username;
		Map<String, String> map=new HashMap<String,String>();
		map.put("value", value);
		map.put("name", username);
		userhots=mcs.getUserhotsByKeyWord(map);
		return "success";
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public void setMcs(myCustomService mcs) {
		this.mcs = mcs;
	}

	public List<Userhot> getUserhots() {
		return userhots;
	}

	public void setUserhots(List<Userhot> userhots) {
		this.userhots = userhots;
	}
}
